<?php
ob_start();
?>

<div id="content">
    <h3 style="padding-bottom:20px">Preencha o formulário completo:</h3>
    <form action="../controller/editaFunc.php" method="post">
        <table align="center" cellpadding="2" cellspacing="2">
            <tr>
                <td align="left">Funcionário</td>
                <td>
                    <select   name="funcionario" id="funcionarioID">
                        <option value=""> </option>
                        <?php
                        include ("../model/funcionario.php");
                        $result = Funcionario::FindAll();
                        while ($row = mysql_fetch_assoc($result)) {
                            if ($row['usuario'] != 'admin')
                                echo "<option value=" . $row['id'] . ">" . $row['nome'] . "</option>';";
                        }
                        ?>
                    </select>
                </td>
            </tr>						
            <tr>
                <td>Tipo de perfil</td>
                <td align="left">
                    <select name="tipo" id="tipoID">
                        <option selected value=""></option>
                        <option value="1">Gerente</option>
                        <option value="2">Funcionário</option>
                    </select>
                </td>
            </tr>
            <tr><td colspan="2" align="center">
                    <input type="submit" value="Enviar">
                    <input type="reset" value="Limpar">
                </td></tr>		
        </table>
    </form>
</div>

<?php
$pagemaincontent = ob_get_contents();
ob_end_clean();
$GLOBALS['superUser'] = 1;
$pagetitle = "Cadastrar Funcionário";
include("master.php");
?>